package com.xmutca.cloud.auth.security;

import org.springframework.context.ApplicationListener;
import org.springframework.security.authentication.event.AuthenticationSuccessEvent;
import org.springframework.stereotype.Service;

@Service
public class SecuritySuccessListener implements ApplicationListener<AuthenticationSuccessEvent> {

	@Override
	public void onApplicationEvent(AuthenticationSuccessEvent event) {
		System.out.println(String.format("用户名密码登陆成功事件: %s", event.getAuthentication().getName()));
	}
}
